package com.gxa.jjty.phy.controller;

import com.gxa.jjty.phy.service.NewsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/news")
@Api(tags = "陪护员消息的接口")
public class NewsController {
    @Autowired
    NewsService newsService = null;

    @ApiOperation("获取消息列表的方法")
    @PostMapping("/selectAll")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "phyId",value = "陪护员id")
    })
    public Map selectAll(Long phyId){
        return newsService.selectAll(phyId);
    }

    @ApiOperation("清空消息列表的方法")
    @PostMapping("/empty")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "phyId",value = "陪护员id")
    })
    public Map empty(Long phyId){
        return newsService.empty(phyId);
    }

}
